/**
 * Created by Nealyang on 17/2/25.
 */
const express = require('express');
const router = express.Router();
const Blog = require('../../controller/blog')

//删除操作
router.get('/del', function (req, res, next) {
    Blog.delBlog(req, res, next);
})

//修改操作
router.get('/getById', function (req, res, next) {
    Blog.modBlog(req, res, next);
})

//查询操作
router.get('/', function (req, res, next) {
    Blog.searchBlog(req, res, next);
})

//修改操作
router.post('/modified', function (req, res, next) {
    Blog.modified(req, res, next);
})

// 新增操作
router.post('/add', function (req, res, next) {
    Blog.addBlog(req, res, next);
})

module.exports = router;
